package com.sugang.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;

public class DateFormatUtil extends SimpleDateFormat{

	 public DateFormatUtil(String pattern) {
	  super(pattern);
	 }

	 @Override
	 public java.sql.Date parse(String date) {
	  java.util.Date udate = null;
	 
	   try {
		udate = super.parse(date);
	} catch (ParseException e) {
		e.printStackTrace();
	}
	  
	  return new java.sql.Date(udate.getTime());
	 }
	}